package com.example.safeassistan.my.adapter;

import android.widget.TextView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.example.safeassistan.R;
import com.example.safeassistan.my.model.CheckRecordTypeModel;
import com.example.safeassistan.train.model.MateralList;

import java.util.List;


public class CheckRecordTypeAdapter extends BaseQuickAdapter<CheckRecordTypeModel.ResultDTO, BaseViewHolder> {


    public CheckRecordTypeAdapter(List<CheckRecordTypeModel.ResultDTO> data) {

        super(R.layout.item_flow, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, CheckRecordTypeModel.ResultDTO item) {
        TextView text=helper.getView(R.id.text);
        helper.setText(R.id.text,item.getCheckTypeName());
        if (item.isSelecte()){
            text.setTextColor(mContext.getColor(R.color.blue_3B5BEA));
            text.setBackgroundResource(R.drawable.stoke_blue_bg);
        }else {
            text.setTextColor(mContext.getColor(R.color.gray9));
            text.setBackgroundResource(R.drawable.stoke_gray_bg);
        }

    }
}
